package com.wyd.qxglmybatis.controller;

import javax.annotation.Resource;

import com.wyd.qxglmybatis.service.IRolesModuleService;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/role_module")
public class RolesModuleController {


    @Resource
    private IRolesModuleService rolesModuleService;

    @ApiOperation(value = "给角色授予权限",notes = "给角色授予权限")
 
    @ApiImplicitParams({
        @ApiImplicitParam(name="role_id",value ="角色id",required=true,paramType ="path"),
        @ApiImplicitParam(name="module_id",value ="权限id",required=true,paramType ="path")
       

    })
    @PostMapping(value = "/add/{role_id}/{module_id}")
    public void add(@PathVariable String role_id,@PathVariable String[]  module_id){

        rolesModuleService.addRolesModule(role_id, module_id);;

        
    } 

}